package com.scaffold.chapter.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.scaffold.springmvc.entity.BasicEntity;

@Entity
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class Chapter extends BasicEntity {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "g")
	@SequenceGenerator(name = "g", sequenceName = "SEQ_CHAPTER",allocationSize=1)
	private Long id;
	//文档标题
	private String title;
	/*原始内容*/
	//选中的html
	@Column(length=50000)
	private String html;
	//选中页面href
	private String href;
	//顶层页面 href
	private String top_href;
	//顶层页面 标题
	private String top_title;
	//分类 @ref com.scaffold.catalog.entity.Catalog#id
	@Column(nullable=true)
	private Long catalogId;
	//@ref Topic#id
	@Column(nullable=true)
	private Long topicId;
	//图片映射
	@Column(length=8000)
	private String imgMap;
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public Long getCatalogId() {
		return catalogId;
	}
	public void setCatalogId(Long catalogId) {
		this.catalogId = catalogId;
	}
	public String getTop_href() {
		return top_href;
	}
	public void setTop_href(String top_href) {
		this.top_href = top_href;
	}
	public String getHref() {
		return href;
	}
	public void setHref(String href) {
		this.href = href;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String doc_title) {
		this.title = doc_title;
	}
	public String getTop_title() {
		return top_title;
	}
	public void setTop_title(String top_title) {
		this.top_title = top_title;
	}
	public String getHtml() {
		return html;
	}
	public void setHtml(String html) {
		this.html = html;
	}
	public String getImgMap() {
		return imgMap;
	}
	public void setImgMap(String imgMap) {
		this.imgMap = imgMap;
	}
	public Long getTopicId() {
		return topicId;
	}
	public void setTopicId(Long topicId) {
		this.topicId = topicId;
	}

}
